<!-- @description 全屏弹窗-->
<!-- @author  lizhi -->
<!-- @date 2022-03-24 -->
<template>
	<view style="background-color: transparent;">
		<u-modal :show-cancel-button="true" v-model="modalConfig.show" :content="modalConfig.content"
			@confirm="modalConfig.confirm" @cancel="onCancel"></u-modal>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				modalConfig: {
					show: true,
					content: '',
					confirm: () => {
				
					}
				},
			}
		},
		onLoad(option) {
			this.modalConfig.content = option.content;
			this.modalConfig.confirm = ()=>{
				uni.navigateBack({});
				let eventChannel = this.getOpenerEventChannel();
				eventChannel.emit(option.confirm, {
					data: {}
				});
			}
		},
		methods: {
			onCancel(){
				uni.navigateBack({});
			}
		}
	}
</script>

<style lang="scss">
	page {
		background: transparent;
	}
</style>
